<?php 
Yii::app()->clientScript->registerScriptFile(Yii::app()->request->baseUrl.'/js/switchLanguage.js');
Yii::app()->clientScript->registerScriptFile(Yii::app()->request->baseUrl.'/js/utility.js');
$language = $this->language;
?>
<div id="header">
    <div class="w322 float_left p12t">
       <a href="<?php echo Yii::app()->createUrl('', array('lang' => $this->language)); ?>">
           <img src="<?php echo Yii::app()->request->baseUrl; ?>/images/logo.png"/>
       </a>
    </div>
    
    <div class="w322 float_right">
    
      <?php if($this->isGuest): ?>
      
      <!------>
      <div class="menu_reseller_login">
      	<!-- <?php //echo CHtml::link(Yii::t('menu','Reseller Login'), array('site/login', 'usertype'=>'reseller', 'lang' => $language )); ?>
      	|-->
      	<?php echo CHtml::link(Yii::t('menu','Customer Login'), array('customer/login', 'usertype' => 'customer', 'lang' => $language)); ?>
      </div>
      <!------>
      
      <?php else: ?>
      	
      <!------>
      <div class="menu_reseller_login font15">Welcome to:<span class="yellow_color"> <?php echo Yii::app()->user->getUserName(); ?></span>
      	<?php echo CHtml::link('Come back account', array('customer/summary')); ?>
      </div>
      <!------>
      
      <?php endif; ?>
      
      <div class="box_singup">
      	
      	<!------>
      	<?php if($this->isGuest): ?>
      		<span><?php echo CHtml::link(Yii::t('menu','Sign up'), array('site/customerRegister', 'lang' => $language)); ?></span>
      	<?php else: ?>
	    	<span><?php echo CHtml::link(Yii::t('menu','Logout'), array('customer/logout', 'lang' => $language)); ?></span>      		
      	<?php endif; ?>
      	<!------>
      	
      </div>
      
      <div class="cb"></div>
      <div class="float_right  p20t">
	      <div class="laguage_show">
	      <!-- switch language -->
	      	<?php if(Yii::app()->language == 'spa') :?>
	      	
	      		<!------>
	      		<a href="javascript:void(0);" id="choose">Spanish</a>
		        <div class="choose_lang">
		     		<a href="<?php echo $this->createUrl('index',array('lang'=>'en')); ?>">English</a>
		      	</div>
		      	<!------>
		      	
	      	<?php else: ?>
	      	
	      		<!------>
	      		<a href="javascript:void(0);" id="choose">English</a>
		        <div class="choose_lang">
		     		<a href="<?php echo $this->createUrl('index',array('lang'=>'spa')); ?>">Spanish</a>
		      	</div>
		      	<!------>
		      	
	      	<?php endif; ?>
	      <!-- # switch language -->
	      </div> 
	  </div>
    </div>
    
    <div class="cb"></div>
  </div><!-- #header -->